// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取配置 GET /api/site-setting/base */
export async function getApiSiteSettingBase(options?: { [key: string]: any }) {
  return request<API.SimpleResultSiteSettingsDto>('/api/site-setting/base', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 更新配置 PUT /api/site-setting/${param0}/base */
export async function putApiSiteSettingByIdBase(
  params: {
    // path
    id: number;
  },
  body: API.UpdateSiteSettingsDto,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<any>(`/api/site-setting/${param0}/base`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json-patch+json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 获取站点信息(匿名) GET /api/site-setting/information */
export async function getApiSiteSettingInformation(
  params: {
    // query
    /** 租户id */
    tenantid?: string;
  },
  options?: { [key: string]: any },
) {
  return request<API.SimpleResultSiteInformationDto>('/api/site-setting/information', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取租户的站点配置信息 GET /api/site-setting/tenant-settings/${param0} */
export async function getApiSiteSettingTenantSettingsByTenantid(
  params: {
    // path
    tenantid: string;
  },
  options?: { [key: string]: any },
) {
  const { tenantid: param0, ...queryParams } = params;
  return request<API.SimpleResultSiteSetting>(`/api/site-setting/tenant-settings/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
